import request from '@/utils/request'

// 查询培训材料列表
export function listDocs(query) {
  return request({
    url: '/oa/docs/list',
    method: 'get',
    params: query
  })
}


// 查询培训材料详细
export function getDocs(id) {
  return request({
    url: '/oa/docs/' + id,
    method: 'get'
  })
}

// 新增培训材料
export function addDocs(data) {
  return request({
    url: '/oa/docs',
    method: 'post',
    data: data
  })
}

// 修改培训材料
export function updateDocs(data) {
  return request({
    url: '/oa/docs',
    method: 'put',
    data: data
  })
}

// 删除培训材料
export function delDocs(id) {
  return request({
    url: '/oa/docs/' + id,
    method: 'delete'
  })
}


// 查询培训材料图片列表
export function listDocsImg(query) {
  return request({
    url: '/oa/docsImg/list',
    method: 'get',
    params: query
  })
}

// 查询培训材料图片详细
export function getDocsImg(id) {
  return request({
    url: '/oa/docsImg/' + id,
    method: 'get'
  })
}

// 新增培训材料图片
export function uploadDocimg(data) {
  return request({
    url: '/oa/docsImg/uploadDocimg',
    method: 'post',
    data: data
  })
}

// 修改培训材料图片
export function updateDocsImg(data) {
  return request({
    url: '/oa/docs',
    method: 'put',
    data: data
  })
}

// 删除培训材料图片
export function delDocsImg(id) {
  return request({
    url: '/oa/docsImg/' + id,
    method: 'delete'
  })
}